<!-- 列表行 -->
<template>
  <view class="match-list-item position-relative">
    <view class="type-tag position-absolute">{{ item.type }}</view>
    <view>
      <view class="d-flex justify-content-between">
        <text class="text-name">{{ item.name }}</text>
        <!-- <van-text-ellipsis :content="item.name" class="text-name" /> -->
        <text class="text-count">
          {{ item.count }}
          <text class="text-unit">款</text>
        </text>
      </view>
      <view class="text-time d-flex justify-content-between">
        <text>{{ '匹配时间:' + item.time }}</text>
        <text>{{ isOk ? '可做产品' : '不可做产品' }}</text>
      </view>
    </view>
  </view>
</template>

<script setup>
const props = defineProps({
  item: Object,
})
</script>

<style>
.match-list-item {
  padding: 26px 24px;
  margin-top: 10px;
  background: #ffffff;
  border-radius: 8px;
  .type-tag {
    top: 0;
    left: 0;
    padding: 2px 6px;
    font-size: 12px;
    font-weight: 400;
    line-height: 14px;
    color: #ffffff;
    background: #6aa1ff;
    border-top-left-radius: 8px;
    border-bottom-right-radius: 8px;
  }
  .text-name {
    margin-right: 75px;
    overflow: hidden;
    font-size: 14px;
    font-weight: 500;
    line-height: 22px;
    color: #1d2129;
    text-overflow: ellipsis;
    text-wrap: nowrap;
  }
  .text-count {
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
    color: #000000;
    text-wrap: nowrap;
    .text-unit {
      font-size: 12px;
      font-weight: 400;
      line-height: 20px;
    }
  }
  .text-time {
    font-size: 14px;
    font-weight: 400;
    line-height: 22px;
    color: #a7acb4;
    text-wrap: nowrap;
  }
}
</style>
